// /**
// //  * Magento
//  *
//  * NOTICE OF LICENSE
//  *
//  * This source file is subject to the Academic Free License (AFL 3.0)
//  * that is bundled with this package in the file LICENSE_AFL.txt.
//  * It is also available through the world-wide-web at this URL:
//  * http://opensource.org/licenses/afl-3.0.php
//  * If you did not receive a copy of the license and are unable to
//  * obtain it through the world-wide-web, please send an email
//  * to license@magentocommerce.com so we can send you a copy immediately.
//  *
//  * DISCLAIMER
//  *
//  * Do not edit or add to this file if you wish to upgrade Magento to newer
//  * versions in the future. If you wish to customize Magento for your
//  * needs please refer to http://www.magentocommerce.com for more information.
//  *
//  * @category    design
//  * @copyright   Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
//  * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
//  */

.rating-summary {
    .mixin-rating-summary();
    .rating-result {
        margin-left: -5px;
    }
}

.product-reviews-summary,
.table-reviews {
    .rating-summary {
        .mixin-rating-summary-label-hide();
    }
}

.review-control-vote {
    .mixin-rating-vote();
}

//
//    Add review block
//--------------------------------------
.block {
    &.add.review {
        margin-bottom: @indent-xl-base;
        > .title {
            .heading(h2);
        }
        .legend {
            .heading(h3);
            margin: 0 0 @indent-base;
        }
        .field.rating {
            display: table-row;
            .label {
                display: table-cell;
                vertical-align: middle;
                padding: @indent-xs-base 0;
            }
            .control {
                display: table-cell;
                vertical-align: top;
            }
        }
    }
    &.reviews.list {
        > .title {
            .heading(h2);
        }
        .review {
            &.item {
                margin-bottom: @indent-xl-base;
            }
            &.title {
                .heading(h3);
            }
        }
    }
}

.data.table.reviews {
    .rating-summary {
        margin-top: -4px;
    }
}

.customer-review.view {
    margin-bottom: @indent-base;
    .review.title,
    .ratings-summary,
    .product-details {
        margin-bottom: @indent-base;
    }
}

.product-reviews-summary {
    display: table;
    .products.wrapper.list & {
        margin: 0 auto;
    }
    &.empty {
        margin-left: 0;
    }
    .rating-summary {
        position: relative;
        left: -@indent-xs-base;
        display: table-cell;
        vertical-align: middle;
        text-align: left;
    }
    .reviews-actions {
        display: table-cell;
        vertical-align: middle;
        line-height: floor(@rating-icon-font-size * @line-height-base);
        font-size: floor(0.8 * @font-size-base);
        a {
            margin-right: @indent-xs-base;
        }
        .action.view span {
        }
    }
}

//
//    Desktop
//--------------------------------------
.responsive(@break) when (@break = @screen-m) {
    .product-reviews-summary {
        .products.wrapper.list & {
            margin: 0;
        }
    }
}

.customer-review {
    .product-details {
        &:extend(.abstract-add-clearfix all);
        margin-bottom: @indent-xl-base;
        .rating-average-label {
        }
    }
    .product-media {
        width: 30%;
        max-width: 285px;
        float: left;
        margin-right: 3%;
    }
    .product-info {
    }
    .review-details {
        .title {
        }
        .customer-review-rating {
            .css(margin-bottom, @indent-base);
            .item {
                .css(margin-bottom, @indent-s-base);
                &:last-child {
                    margin-bottom: 0;
                }
            }
        }
        .review-title {
            .heading(h3);
            .css(font-weight, @font-weight-semibold);
            .css(margin-bottom, @indent-base);
        }
        .review-content {
            .css(margin-bottom, @indent-base);
        }
        .review-date {
        }
    }
    .product-reviews-summary {
        .rating-summary,
        .reviews-actions {
            display: block;
        }
    }
}

.review-field-ratings {
    .nested {
        display: table;
    }
    .review-field-rating {
        display: table-row;
        .label,
        .control {
            display: table-cell;
            padding-bottom: @indent-s-base;
            vertical-align: top;
        }
        .label {
            padding-top: 6px;
            padding-right: @indent-s-base;
        }
        .control {
            padding-top: 2px;
        }
    }
}

//
//    Review product page
//--------------------------------------
.review {
    &-toolbar {
        border-top: 1px solid #c9c9c9;
        margin: 0 0 @indent-base;
        text-align: center;
        &:first-child {
            display: none;
        }
        .pages {
            display: block;
            text-align: center;
            border-bottom: 1px solid #c9c9c9;
            padding: @indent-base 0;
        }
        .limiter {
            display: none;
        }
    }
    &-add {
        .block-title {
            display: none;
        }
    }
    &-form {
        .action.submit.primary {
            .button-revert-secondary-color();
        }
        .actions-toolbar .actions-primary {
        }
    }
    &-fieldset {}
    .fieldset &-legend.legend {
        &:extend(.abstract-reset-left-margin all);
        strong {
            display: block;
            margin-left: 0;
        }
        margin-bottom: @indent-base;
    }
    .fieldset &-field-ratings {
        > .label {
        }
    }
    &-control-vote label:before,
    &-control-vote:before {
    }
    &-field-rating {
        .label {
        }
        .control {
            margin-top: @indent-s-base;
            margin-bottom: 1.2*@indent-xl-base;
        }
    }
    &-list {
        .block-title strong {
            .heading(h2);
        }
        margin-bottom: @indent-l-base;
    }
    &-item {
        padding: @indent-base 0;
        border-bottom: 1px solid #c9c9c9;
        margin: 0;
        .clearer();
        &:last-child {
            border-width: 0;
        }
    }
    &-ratings {
        display: table;
        max-width: 100%;
        margin-bottom: @indent-s-base;
        &:extend(.abstract-rating-summary all);
    }
    &-author {
        display: inline;
        .review-details-value {
        }
    }
    &-date {
        .review-details-label {
        }
    }
    &-title {
        .heading(h3);
        margin: 0 0 @indent-base;
    }
    &-content {
        margin-bottom: @indent-base;
    }
}

//
//    Desktop
//--------------------------------------
.responsive(@break) when (@break = @screen-s) {
    .review {
        &-form {
            max-width: 500px;
        }

        @review-ratings-left: 280px;
        &-ratings {
            max-width: @review-ratings-left - @indent-xl-base;
            float: left;
            margin-bottom: 0;
        }
        &-ratings ~ &-content,
        &-ratings ~ &-details {
            margin-left: @review-ratings-left;
        }

        @reviews-indent-desktop: 30px;
        &-toolbar {
            margin: 0 0 @reviews-indent-desktop;
            .pages {
                padding: @reviews-indent-desktop 0;
            }
        }
        .fieldset &-legend.legend {
            margin-bottom: @reviews-indent-desktop;
        }
        &-item {
            padding: @reviews-indent-desktop 0;
        }
        &-title {
            margin: 0 0 @reviews-indent-desktop;
        }
    }
}
